package org.fenixsoft.jvm.chapter7;

/**
 * @author zzm
 *
 * 功能：区分清除Sub类的"接口递归"和"父类递归"2条查找字段的路径，且javac相对JVM规范更加严格《周志明，jvm》
 */
public class FieldResolution {

    interface Interface0 {
        int A = 0;
    }

    interface Interface1 extends Interface0 {
        int A = 1;
    }

    interface Interface2 {
//        int A = 2;
    }

    static class Parent implements Interface1 {
        public static int A = 3;
    }

    static class Sub extends Parent implements Interface2 {
//        public static int A = 4;
    }

    public static void main(String[] args) {
        System.out.println(Sub.A);
    }
}
